#include "../func.h"

void sig(int signum)
{
    printf("before sleep, I am signal %d\n", signum);
    sleep(3);
    printf("after sleep, I am signal %d\n", signum);
}

int main()
{
    if (signal(SIGINT, sig) == SIG_ERR)
    {
        perror("signal");
        return -1;
    }
    signal(SIGQUIT, sig);
    while(1);
}
